home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / fsio / fsio.h < prev    next >
C/C++ Source or Header  |  1991-05-20  |  21KB  |  495 lines

  1. /*
  2.  * fsio.h --
  3.  *
  4.  *    Declarations of stream IO routines.
  5.  *
  6.  * Copyright 1989 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /sprite/src/kernel/fsio/RCS/fsio.h,v 9.9 91/05/20 17:45:30 kupfer Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _FSIO
  19. #define _FSIO
  20.  
  21. #include <fs.h>
  22.  
  23. /*
  24.  * Structure that is transfered when a stream is migrated with a process
  25.  */
  26.  
  27. typedef struct Fsio_MigInfo {
  28.     Fs_FileID    streamID;    /* Stream identifier. */
  29.     Fs_FileID    ioFileID;         /* I/O handle for the stream. */
  30.     Fs_FileID    nameID;        /* ID of name of the file.  Used for attrs. */
  31.     Fs_FileID    rootID;        /* ID of the root of the file's domain. */
  32.     int        srcClientID;    /* Client transfering from. */
  33.     int         offset;         /* File access position. */
  34.     int         flags;          /* Usage flags from the stream. */
  35. } Fsio_MigInfo;
  36.  
  37. /*
  38.  * Stream Types:
  39.  *    FSIO_STREAM        Top level type for stream with offset.  Streams
  40.  *                have an ID and are in the handle table to
  41.  *                support migration and shared stream offsets.
  42.  * The remaining types are for I/O handles
  43.  *    FSIO_LCL_FILE_STREAM    For a regular disk file stored locally.
  44.  *    FSIO_RMT_FILE_STREAM    For a remote Sprite file.
  45.  *    FSIO_LCL_DEVICE_STREAM    For a device on this host.
  46.  *    FSIO_RMT_DEVICE_STREAM    For a remote device.
  47.  *    FSIO_LCL_PIPE_STREAM    For an anonymous pipe buffered on this host.
  48.  *    FSIO_RMT_PIPE_STREAM    For an anonymous pipe bufferd on a remote host.
  49.  *                This type arises from process migration.
  50.  *    FSIO_CONTROL_STREAM    This is the stream used by the server for
  51.  *                a pseudo device to listen for new clients.
  52.  *    FSIO_SERVER_STREAM    The main state for a pdev request-response
  53.  *                connection.  Refereneced by the server's stream.
  54.  *    FSIO_LCL_PSEUDO_STREAM    A client's handle on a request-response
  55.  *                connection to a local pdev server.
  56.  *    FSIO_RMT_PSEUDO_STREAM    As above, but when the pdev server is remote.
  57.  *    FSIO_PFS_CONTROL_STREAM    Control stream for pseudo-filesystems.
  58.  *    FSIO_PFS_NAMING_STREAM    The request-response stream used for naming
  59.  *                operations in a pseudo-filesystem.  This
  60.  *                I/O handle is hung off the prefix table.
  61.  *    FSIO_LCL_PFS_STREAM    A clients' handle on a request-response
  62.  *                connection to a local pfs server.
  63.  *    FSIO_RMT_PFS_STREAM    As above, but when the pfs server is remote.
  64.  *    FSIO_RMT_CONTROL_STREAM    Needed only during get/set I/O attributes of
  65.  *                a pseudo-device whose server is remote.
  66.  *    FSIO_PASSING_STREAM    Used to pass streams from a pseudo-device
  67.  *                server to its client in response to an open.
  68.  *        Internet Protocols (Not implemented in the kernel (yet?))
  69.  *    FSIO_RAW_IP_STREAM    Raw Internet Protocol stream.
  70.  *    FSIO_UDP_STREAM        UDP protocol stream.
  71.  *    FSIO_TCP_STREAM        TCP protocol stream.
  72.  *
  73.  * The following streams are not implemented
  74.  *    FS_RMT_NFS_STREAM    NFS access implemented in kernel.
  75.  *    FS_RMT_UNIX_STREAM    For files on the old hybrid unix/sprite server.
  76.  *    FS_LCL_NAMED_PIPE_STREAM Stream to a named pipe whose backing file
  77.  *                is on the local host.
  78.  *    FS_RMT_NAMED_PIPE_STREAM Stream to a named pipe whose backing file
  79.  *                is remote. 
  80.  */
  81. #define FSIO_STREAM            0
  82. #define FSIO_LCL_FILE_STREAM        1
  83. #define FSIO_RMT_FILE_STREAM        2
  84. #define FSIO_LCL_DEVICE_STREAM        3
  85. #define FSIO_RMT_DEVICE_STREAM        4
  86. #define FSIO_LCL_PIPE_STREAM        5
  87. #define FSIO_RMT_PIPE_STREAM        6
  88. #define FSIO_CONTROL_STREAM        7
  89. #define FSIO_SERVER_STREAM        8
  90. #define FSIO_LCL_PSEUDO_STREAM        9
  91. #define FSIO_RMT_PSEUDO_STREAM        10
  92. #define FSIO_PFS_CONTROL_STREAM        11
  93. #define FSIO_PFS_NAMING_STREAM        12
  94. #define FSIO_LCL_PFS_STREAM        13
  95. #define FSIO_RMT_PFS_STREAM        14
  96. #define FSIO_RMT_CONTROL_STREAM        15
  97. #define FSIO_PASSING_STREAM        16
  98. #define FSIO_RAW_IP_STREAM        17
  99. #define FSIO_UDP_STREAM            18
  100. #define FSIO_TCP_STREAM            19
  101.  
  102. #define FSIO_NUM_STREAM_TYPES        20
  103.  
  104. /*
  105.  * Two arrays are used to map between local and remote types.  This has
  106.  * to happen when shipping Fs_FileIDs between clients and servers.
  107.  */
  108. extern int fsio_LclToRmtType[];
  109. extern int fsio_RmtToLclType[];
  110. /*
  111.  * Fsio_MapLclToRmtType(type) - Maps from a local to a remote stream type.
  112.  *    This returns -1 if the input type is out-of-range.
  113.  */
  114. #define Fsio_MapLclToRmtType(localType) \
  115.     ( ((localType) < 0 || (localType) >= FSIO_NUM_STREAM_TYPES) ? -1 : \
  116.     fsio_LclToRmtType[localType] )
  117. /*
  118.  * Fsio_MapRmtToLclType(type) - Maps from a remote to a local stream type.
  119.  *    This returns -1 if the input type is out-of-range.
  120.  */
  121. #define Fsio_MapRmtToLclType(remoteType) \
  122.     ( ((remoteType) < 0 || (remoteType) >= FSIO_NUM_STREAM_TYPES) ? -1 : \
  123.     fsio_RmtToLclType[remoteType] )
  124.  
  125.  
  126.  
  127.  
  128. /*
  129.  * STREAM SWITCH
  130.  *    These procedures are called by top-level procedures (i.e. Fs_Read,
  131.  *    or Fs_Select) to do stream-type specific processing.
  132.  */
  133.  
  134. typedef struct Fsio_StreamTypeOps {
  135.     int        type;            /* Stream types defined above */
  136.     /*
  137.      **************** Setup operation for clients. *************************
  138.      *    This routine sets up an I/O handle for a stream.  It uses streamData
  139.      *  that was genereated by the nameOpen routine on the file server.  As
  140.      *  a side effect it fills in the nameInfoPtr->fileID for use later
  141.      *  when getting/setting attributes.
  142.      *
  143.      *    FooIoOpen(ioFileIDPtr, flagsPtr, clientID, data, name, hdrPtrPtr)
  144.      *        Fs_FileID    *ioFileIDPtr;    (indicates object)
  145.      *        int        *flagsPtr;    (from the stream)
  146.      *        int        clientID;    (who's opening it)
  147.      *        ClientData    data;        (stream data from nameOpen)
  148.      *        char         *name;        (name for error messages)
  149.      *        Fs_HandleHeader    **hdrPtrPtr;    (Returned I/O handle)
  150.      */
  151.     ReturnStatus (*ioOpen) _ARGS_((Fs_FileID *ioFileIDPtr, int *flagsPtr, 
  152.                 int clientID, ClientData streamData, 
  153.                 char *name, Fs_HandleHeader **ioHandlePtrPtr));
  154.  
  155.     /*
  156.      **************** Regular I/O operations. ******************************
  157.      *  These are the standard read/write routines.  Note:  they are passed
  158.      *  a stream pointer to support streams shared accross the network.
  159.      *  A shared stream is indicated by FS_RMT_SHARED in the ioPtr->flags.
  160.      *    Note that only the fileID and the ioHandlePtr of the streamPtr
  161.      *    is guaranteed to be valid.  The stream-specific routine should ignore
  162.      *    the flags and offset kept (or not kept) in the stream structure.
  163.      *
  164.      *    FooRead(streamPtr, ioPtr, waitPtr, replyPtr)
  165.      *    FooWrite(streamPtr, ioPtr, waitPtr, replyPtr)
  166.      *        Fs_Stream    *streamPtr;    (See above about valid fields )
  167.      *        Fs_IOParam    *ioPtr;        (Standard parameter block)
  168.      *        Sync_RemoteWaiter *waitPtr;    (For remote waiting)
  169.      *        Fs_IOReply    *reply;        (For return length and signal)
  170.      */
  171.     ReturnStatus (*read) _ARGS_((Fs_Stream *streamPtr, Fs_IOParam *readPtr, 
  172.                 Sync_RemoteWaiter *remoteWaitPtr, 
  173.                 Fs_IOReply *replyPtr));
  174.     ReturnStatus (*write) _ARGS_((Fs_Stream *streamPtr, Fs_IOParam *writePtr, 
  175.                                   Sync_RemoteWaiter *remoteWaitPtr, 
  176.                   Fs_IOReply *replyPtr));
  177.     /*
  178.      **************** VM I/O operations. ******************************
  179.      *  These are the read/write routines used by VM during paging.
  180.      *    The interface is the same as the regular read and write routines,
  181.      *    so those routines can be re-used, if appropriate.
  182.      *
  183.      *    FooPageRead(streamPtr, ioPtr, waitPtr, replyPtr)
  184.      *    FooPageWrite(streamPtr, ioPtr, waitPtr, replyPtr)
  185.      *        Fs_Stream    *streamPtr;    (See above about valid fields)
  186.      *        Fs_IOParam    *ioPtr;        (Standard parameter block)
  187.      *        Sync_RemoteWaiter *waitPtr;    (For remote waiting)
  188.      *        Fs_IOReply    *reply;        (For return length and signal)
  189.      * 
  190.      *    FooBlockCopy(srcHdrPtr, destHdrPtr, blockNum)
  191.      *         Fs_HandleHeader *srcHdrPtr;  ( Handle for source file. )
  192.      *         Fs_HandleHeader *destHdrPtr; ( Handle for dest file. )
  193.      *         int        *blockNum;   ( Block number to copy. )
  194.      */
  195.     ReturnStatus (*pageRead) _ARGS_((Fs_Stream *streamPtr, Fs_IOParam *readPtr, 
  196.                 Sync_RemoteWaiter *remoteWaitPtr, 
  197.                 Fs_IOReply *replyPtr));
  198.     ReturnStatus (*pageWrite) _ARGS_((Fs_Stream *streamPtr,
  199.                       Fs_IOParam *writePtr, 
  200.                                       Sync_RemoteWaiter *remoteWaitPtr, 
  201.                       Fs_IOReply *replyPtr));
  202.     ReturnStatus (*blockCopy) _ARGS_((Fs_HandleHeader *srcHdrPtr, 
  203.                     Fs_HandleHeader *dstHdrPtr, 
  204.                     int blockNum));
  205.     /*
  206.      ***************** I/O Control. ****************************************
  207.      *  Stream-specific I/O controls.  The main procedure Fs_IOControl
  208.      *    handles some generic I/O controls, and then passes the I/O control
  209.      *    down to the stream-specific handler.
  210.      *
  211.      */
  212.     ReturnStatus (*ioControl) _ARGS_((Fs_Stream *streamPtr, 
  213.                       Fs_IOCParam *ioctlPtr, 
  214.                       Fs_IOReply *replyPtr));
  215.     /*
  216.      ***************** Select. *********************************************
  217.      *  The select interface includes three In/Out bit words.  There is
  218.      *  at most one bit set in each, and the selectability can be easily
  219.      *  turned off by clearing the word.  Never do anything to these
  220.      *  words other than leave them alone or clear them.
  221.      *
  222.      *    FooSelect(hdrPtr, waitPtr, readPtr, writePtr, exceptPtr)
  223.      *        Fs_HandleHeader        *hdrPtr;    (File handle)
  224.      *        Sync_RemoteWaiter    *waitPtr;    (Remote waiting info)
  225.      *        int            *readPtr;    (In/Out read bit)
  226.      *        int            *writePtr;    (In/Out write bit)
  227.      *        int            *exceptPtr;    (In/Out except bit)
  228.      */
  229.     ReturnStatus (*select)  _ARGS_((Fs_HandleHeader *hdrPtr, 
  230.                     Sync_RemoteWaiter *waitPtr, int *readPtr, 
  231.                     int *writePtr, int *exceptPtr));
  232.     /*
  233.      **************** Attribute operations on open streams. *****************
  234.      *    These just operate on the few attributes cached at the I/O server.
  235.      *  The name server is first contacted to set/initialize the attributes,
  236.      *  (either via the DOMAIN switch with pathnames,
  237.      *  or via the ATTRIBUTE switch with open streams)
  238.      *  and then these routines are called to complete the attributes from
  239.      *  ones cached on the I/O server, or to update the ones cached there.
  240.      *
  241.      *    FooGetIOAttr(fileIDPtr, clientID, attrPtr)
  242.      *    FooSetIOAttr(fileIDPtr, attrPtr, flags)
  243.      *        Fs_FileID        *fileIDPtr;    (Identfies file)
  244.      *        int            clientID;    (Client getting attrs)
  245.      *        Fs_Attributes        *attrPtr;    (Attrs to set/update)
  246.      *        int            flags;        (which attrs to set)
  247.      */
  248.     ReturnStatus (*getIOAttr) _ARGS_((Fs_FileID *fileIDPtr, int clientID, 
  249.                       Fs_Attributes *attrPtr));
  250.     ReturnStatus (*setIOAttr) _ARGS_((Fs_FileID *fileIDPtr, 
  251.                       Fs_Attributes *attrPtr, int flags));
  252.     /*
  253.      **************** Server verification of remote handle. *****************
  254.      *    This returns the server's file handle given a client's fileID.
  255.      *  There are two parts to this task.  The first is to map from the
  256.      *  client's fileID.type (i.e. FSIO_RMT_DEVICE_STREAM) to the server's
  257.      *  (i.e. FSIO_LCL_DEVICE_STREAM).  The second step is to check that the
  258.      *  client is recorded in the clientList of the I/O handle.  The domain
  259.      *    type is returned for use in naming operations.
  260.      *
  261.      *    Fs_HandleHeader *
  262.      *    FooClientVerify(fileIDPtr, clientID, domainTypePtr)
  263.      *        Fs_FileID    *fileIDPtr;        (Client's handle)
  264.      *        int        clientID;        (The client hostID)
  265.      *        int        *domainTypePtr;        (may be NIL)
  266.      */
  267.     Fs_HandleHeader *(*clientVerify) _ARGS_((Fs_FileID *fileIDPtr, 
  268.                          int clientID, int *domainTypePtr));
  269.     /*
  270.      *************** Migration calls. **************************************
  271.      *
  272.      *  The 'release' is called on the source client of migration via an RPC
  273.      *        from the I/O server.  Its job is to release any referneces
  274.      *        on the I/O handle that were due to a stream which has
  275.      *        now migrated away from the source client.
  276.      *  The 'migrate' is called from Fsio_DeencapStream to update client
  277.      *        book-keeping to reflect the migration.  The version on
  278.      *        remote clients just does an RPC to the I/O server to
  279.      *        invoke the appropriate migrate routine there.
  280.      *        Important:  If the FS_RMT_SHARED flag is present it means
  281.      *        that there is still a stream on the original client and its
  282.      *        references should not be removed from the I/O handle.
  283.      *        Also, if the FS_NEW_STREAM flag is present it means that
  284.      *        the stream is newly migrated to the client so references
  285.      *        should be added for the dstClient.
  286.      *  The 'migEnd' is called from Fsio_DeencapStream after the call to the
  287.      *        migrate procedure, but only the first time the stream
  288.      *        is migrated to the host.  (After that it suffices to
  289.      *        add references to the existing stream.)
  290.      *
  291.      *    FooRelease(hdrPtr, flags)
  292.      *        Fs_HandleHeader    *hdrPtr;        (File handle)
  293.      *        int        flags;            (From the stream)
  294.      *    FooMigEnd(migInfoPtr, size, data, hdrPtrPtr)
  295.      *        Fsio_MigInfo    migInfoPtr;        (Migration state)
  296.      *        int        size;            (size of data)
  297.      *        ClientData    data;            (data from migrate)
  298.      *        Fs_HandleHeader    **hdrPtrPtr;        (Returned handle)
  299.      *    FooSrvMigrate(migInfoPtr, dstClientID, flagsPtr, offsetPtr sizePtr, dataPtr)
  300.      *        Fsio_MigInfo    *migInfoPtr;        (Migration state)
  301.      *        int        dstClientID;        (ID of target client)
  302.      *        int        *flagsPtr;        (In/Out Stream flags)
  303.      *        int        *offsetPtr;        (Return - new offset)
  304.      *        int        *sizePtr;        (Return - size of data)
  305.      *        Address        *dataPtr;        (Return data)
  306.      */
  307.     ReturnStatus (*release) _ARGS_((Fs_HandleHeader *hdrPtr, int flags));
  308.     ReturnStatus (*migEnd) _ARGS_((Fsio_MigInfo *migInfoPtr, int size, 
  309.                   ClientData data, 
  310.                   Fs_HandleHeader **hdrPtrPtr));
  311.     ReturnStatus (*migrate) _ARGS_((Fsio_MigInfo *migInfoPtr, int dstClientID, 
  312.                     int *flagsPtr, int *offsetPtr, 
  313.                     int *sizePtr, Address *dataPtr));
  314.     /*
  315.      *************** Recovery calls. ****************************************
  316.      *  This (should be) two routines, one called on client host's top
  317.      *    reopen at the server, and one called on the server in response
  318.      *  to a client's reopen request.
  319.      *
  320.      *    FooReopen(hdrPtr, clientID, inData, outSizePtr, outDataPtr)
  321.      *        (The hdrPtr is only valid on clients.)
  322.      *        Fs_HandleHeader *hdrPtr;        (Handle to re-open)
  323.      *        (The following are only valid on servers.)
  324.      *        int        clientID;    (client doing the re-open)
  325.      *        ClientData    inData;        (state from the client)
  326.      *        int        *outSizePtr;    (sizeof outData)
  327.      *        ClientData    *outDataPtr;    (state returned to client)
  328.      */
  329.     ReturnStatus (*reopen)  _ARGS_((Fs_HandleHeader *hdrPtr, int clientID, 
  330.                     ClientData inData, int *outSizePtr,
  331.                     ClientData *outDataPtr));
  332.     /*
  333.      *************** Clean up operations. **********************************
  334.      * 'scavenge' is called periodically to clean up unneeded handles.
  335.      *        Important: the scavenge procedure must either remove or
  336.      *        unlock the handle it is still in use.
  337.      * 'clientKill' is called to clean up after dead clients.  This is
  338.      *        called before the scavenge routine if a periodic check
  339.      *        on the client fails, or called independently if some other
  340.      *        communication failure occurs.
  341.      * 'close' is called when the last reference to a stream is closed.
  342.      *        This routine should clean up any use/reference counts
  343.      *        due to the stream as indicated by the flags argument.
  344.      *
  345.      *    FooScavenge(hdrPtr)
  346.      *        Fs_HandleHeader    *hdrPtr;        (File handle)
  347.      *    FooClientKill(hdrPtr, clientID)
  348.      *        Fs_HandleHeader    *hdrPtr;        (File handle)
  349.      *        int        clientID;        (Client presumed down)
  350.      *    FooClose(hdrPtr, clientID, procID, flags, size, data)
  351.      *        Fs_HandleHeader    *hdrPtr;        (File handle)
  352.      *        int        clientID;        (Host ID of closer)
  353.      *        Proc_Pid    procID;            (ProcessID of closer)
  354.      *        int        flags;            (From the stream)
  355.      *        int        size;            (Size of data)
  356.      *        ClientData    data;            (Extra close data)
  357.      */
  358.     Boolean     (*scavenge) _ARGS_((Fs_HandleHeader *hdrPtr));
  359.     void     (*clientKill) _ARGS_((Fs_HandleHeader *hdrPtr, int clientID));
  360. #ifdef SOSP91
  361.     ReturnStatus (*close) _ARGS_((Fs_Stream *streamPtr, int clientID, 
  362.                   Proc_PID procID, int flags, int dataSize, 
  363.                   ClientData closeData, int *offsetPtr,
  364.                   int *rwFlagsPtr));
  365. #else
  366.     ReturnStatus (*close) _ARGS_((Fs_Stream *streamPtr, int clientID, 
  367.                   Proc_PID procID, int flags, int dataSize, 
  368.                   ClientData closeData));
  369. #endif
  370. } Fsio_StreamTypeOps;
  371.  
  372. extern Fsio_StreamTypeOps fsio_StreamOpTable[];
  373.  
  374. typedef struct FsioStreamClient {
  375.     List_Links links;        /* This hangs off the stream */
  376.     int        clientID;    /* The sprite ID of the client */
  377. } FsioStreamClient;
  378.  
  379.  
  380.  
  381. /*
  382.  * The following structures are subfields of the various I/O handles.
  383.  * First we define a use count structure to handle common book keeping needs.
  384.  */
  385.  
  386. typedef struct Fsio_UseCounts {
  387.     int        ref;        /* The number of referneces to handle */
  388.     int        write;        /* The number of writers on handle */
  389.     int        exec;        /* The number of executors of handle */
  390. } Fsio_UseCounts;
  391.  
  392. /*
  393.  * Exported type for async I/O requests.
  394.  */
  395.  
  396. typedef struct Fsio_Request *Fsio_RequestToken;
  397.  
  398. extern Fsio_RequestToken Fsio_DeviceBlockIOAsync();
  399. extern Fsio_DeviceBlockIOPoll();
  400.  
  401.  
  402. /*
  403.  * Recovery testing switch table.
  404.  */
  405. typedef struct Fsio_RecovTestInfo {
  406.     int        (*refFunc)();        /* number of references */
  407.     int        (*numBlocksFunc)();    /* number of blocks in the cache */
  408.     int        (*numDirtyBlocksFunc)();/* number of dirty blocks in cache */
  409. } Fsio_RecovTestInfo;
  410.  
  411. extern    Fsio_RecovTestInfo    fsio_StreamRecovTestFuncs[];
  412.  
  413. /*
  414.  * Recovery testing operations.
  415.  */
  416. extern    int    Fsio_FileRecovTestUseCount();
  417. extern    int    Fsio_FileRecovTestNumCacheBlocks();
  418. extern    int    Fsio_FileRecovTestNumDirtyCacheBlocks();
  419. extern    int    Fsio_DeviceRecovTestUseCount();
  420. extern    int    Fsio_PipeRecovTestUseCount();
  421.  
  422. /*
  423.  * Initialization
  424.  */
  425. extern void Fsio_InstallStreamOps _ARGS_((int streamType,
  426.             Fsio_StreamTypeOps *streamOpsPtr));
  427.  
  428. extern ReturnStatus Fsio_CreatePipe _ARGS_((Fs_Stream **inStreamPtrPtr, 
  429.             Fs_Stream **outStreamPtrPtr));
  430.  
  431. extern void Fsio_Bin _ARGS_((void));
  432. extern void Fsio_InitializeOps _ARGS_((void));
  433.  
  434. /*
  435.  * Stream client list functions.
  436.  */
  437. extern Boolean Fsio_StreamClientOpen _ARGS_((List_Links *clientList,
  438.             int clientID, int useFlags, Boolean *foundPtr));
  439. extern Boolean Fsio_StreamClientClose _ARGS_((List_Links *clientList, 
  440.             int clientID));
  441. extern Boolean Fsio_StreamClientFind _ARGS_((List_Links *clientList, 
  442.             int clientID));
  443.  
  444. /*
  445.  * Stream manipulation routines.
  446.  */
  447. extern Fs_Stream *Fsio_StreamCreate _ARGS_((int serverID, int clientID,
  448.             Fs_HandleHeader *ioHandlePtr, int useFlags, char *name));
  449. extern Fs_Stream *Fsio_StreamAddClient _ARGS_((Fs_FileID *streamIDPtr,
  450.             int clientID, Fs_HandleHeader *ioHandlePtr, 
  451.             int useFlags, char *name, Boolean *foundClientPtr, 
  452.             Boolean *foundStreamPtr));
  453. extern void Fsio_StreamMigClient _ARGS_((Fsio_MigInfo *migInfoPtr, 
  454.             int dstClientID, Fs_HandleHeader *ioHandlePtr, 
  455.             Boolean *closeSrcClientPtr));
  456. extern Fs_Stream *Fsio_StreamClientVerify _ARGS_((Fs_FileID *streamIDPtr, 
  457.             Fs_HandleHeader *ioHandlePtr, int clientID));
  458. extern void Fsio_StreamCreateID _ARGS_((int serverID, Fs_FileID *streamIDPtr));
  459. extern void Fsio_StreamCopy _ARGS_((Fs_Stream *oldStreamPtr,
  460.             Fs_Stream **newStreamPtrPtr));
  461. extern void Fsio_StreamDestroy _ARGS_((Fs_Stream *streamPtr));
  462. extern ReturnStatus Fsio_StreamMigClose _ARGS_((Fs_Stream *streamPtr, 
  463.             Boolean *inUsePtr));
  464. extern ReturnStatus Fsio_StreamMigCloseNew _ARGS_((Fs_Stream *streamPtr, 
  465.             Boolean *inUsePtr, int *offsetPtr));
  466. extern ReturnStatus Fsio_StreamReopen _ARGS_((Fs_HandleHeader *hdrPtr, 
  467.             int clientID, ClientData inData, int *outSizePtr, 
  468.             ClientData *outDataPtr));
  469.  
  470.  
  471.  
  472. /*
  473.  * Migration support
  474.  */
  475. extern ReturnStatus Fsio_EncapStream _ARGS_((Fs_Stream *streamPtr, 
  476.             Address bufPtr));
  477. extern ReturnStatus Fsio_DeencapStream _ARGS_((Address bufPtr,
  478.             Fs_Stream **streamPtrPtr));
  479. extern void Fsio_MigrateUseCounts _ARGS_((int flags, 
  480.             Boolean closeSrcClient, Fsio_UseCounts *usePtr));
  481. extern void Fsio_MigrateClient _ARGS_((List_Links *clientList, int srcClientID,
  482.             int dstClientID, int flags, Boolean closeSrcClient));
  483.  
  484. /*
  485.  * Null procs for switch tables.
  486.  */
  487. extern void Fsio_NullClientKill _ARGS_((Fs_HandleHeader *hdrPtr, int clientID));
  488. extern void Fsio_StreamClientKill _ARGS_((Fs_HandleHeader *hdrPtr, int clientID));
  489. extern ReturnStatus Fsio_NullProc ();
  490. extern ReturnStatus Fsio_NoProc ();
  491. extern Fs_HandleHeader *Fsio_NoHandle ();
  492.  
  493.  
  494. #endif
  495.